<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="./js/echarts.js"></script>
</head>
<body>
<div id="main" style="width: 600px;height:600px;"></div>
<script type="text/javascript">
    // import * as echarts from 'echarts';
    // import * as echarts from 'echarts';
    $.get("/ssm/tj/patientCount",function (backData){
        showPie(backData.data);
    });
    function showPie(haha) {
        var chartDom = document.getElementById('main');
        var myChart = echarts.init(chartDom);
         var option = {
            xAxis: {
                type: 'category',
                data: [],
            },
            yAxis: {
                type: 'value',
            },
            series: [
                {
                    data: [],
                    type: 'line',
                    symbol: 'triangle',
                    symbolSize: 20,
                    lineStyle: {
                        color: 'blue',
                        width: 4,
                        type: 'dashed'
                    },
                    itemStyle: {
                        borderWidth: 3,
                        borderColor:'blue',
                        color: 'blue'
                    }
                }
            ]
        };
        for (var i = 0;i<haha.length;i++){
            option.xAxis.data[i]=haha[i].datePatients;
            option.series[0].data[i]=haha[i].countPatients
        }
        option && myChart.setOption(option);
    }

</script>
</body>
</html>
